package de.szut.ita13.sommerfeld.loganalyser;

import java.util.ArrayList;

public class User {
	
	private ArrayList logs;
	private String userid;
	private Date firstAction;
	private Date lastAction;
	private long totalsize;
	
	
	public User(ArrayList logs, String userid, Date firstAction, Date lastAction, long totalsize) {
		this.logs = logs;
		this.userid = userid;
		this.firstAction = firstAction;
		this.lastAction = lastAction;
		this.totalsize = totalsize;
	}
	
	public User() {
		
	}
	
	public User(String userid) {
		this.userid = userid;
		logs = new ArrayList();
	}
	
	public boolean hasFirstAction() {
		return firstAction != null;
	}
	
	public void addResourceSize(int size) {
		totalsize  += size;
	}
	
	public ArrayList getLogs() {
		return logs;
	}

	public void setLogs(ArrayList logs) {
		this.logs = logs;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public Date getFirstAction() {
		return firstAction;
	}

	public void setFirstAction(Date firstAction) {
		this.firstAction = firstAction;
	}

	public Date getLastAction() {
		return lastAction;
	}

	public void setLastAction(Date lastAction) {
		this.lastAction = lastAction;
	}

	public long getTotalsize() {
		return totalsize;
	}

	public void setTotalsize(long totalsize) {
		this.totalsize = totalsize;
	}
	
}
